package ge.gen.eBdgt.vo;


import java.io.Serializable;

public final class CRUD implements Serializable {
    public static final CRUD CREATE = new CRUD('c');
    public static final CRUD READ = new CRUD('r');
    public static final CRUD UPDATE = new CRUD('u');
    public static final CRUD DELETE = new CRUD('d');

    private final char crud;

    private CRUD(char crud) {
        this.crud = crud;
    }

    @Override
    public int hashCode() {
        return new String("" + this.crud).hashCode();
    }

    @Override
    public boolean equals(Object obj) {
        if ((obj == null) || !(obj instanceof CRUD)) {
            return false;
        }
        CRUD rightHandInstance = (CRUD) obj;
        return this.crud == rightHandInstance.crud;
    }

    @Override
    public String toString() {
        return "" + this.crud;
    }

    public char getCharRepresentaion() {
        return crud;
    }

    
}
